//student
//建立student需要的集合模型对象  
//建立class与模型的关系
let mongoose = require('mongoose');
let Student = new mongoose.Schema({
    name: String,
    age: String,
    phone: String,
    classId: {
        type: mongoose.SchemaTypes.ObjectId,
        ref: 'classModel1'
    }
})
let Classname = new mongoose.Schema({
    name: String
})
//建立class与模型的关系
let classModel1 = mongoose.model('classModel1', Classname, 'class');
//建立student与模型的关系
mongoose.model('studentModel', Student, 'student');
//建立addstudent
studentaddModel = mongoose.model('studentaddModel', Student, 'student');
//建立删除模型
studentdeleteModel = mongoose.model('studentdeleteModel', Student,'student');
//建立修改模型
studentchangeModel = mongoose.model('studentchangeModel',Student,'student')